package com.scs.application.modules.dept.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 科室请领单明细
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "科室请领明细表")
@TableName("dept_apply_item")
@EntityIndexAnnotation(ix = {"apply_id","apply_type","matr_id"})
public class ApplyItem extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "外键",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String applyId;

    @EntityFieldAnnotation(
            text = "耗材ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "品名",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "hrp编码",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hrpCode;

    @EntityFieldAnnotation(
            text = "品规",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "包装数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "包装比率",
            length = "18",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageRate;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQty;

    @EntityFieldAnnotation(
            text = "单品单价(元)",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "总价(元)",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double amount;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;
    @EntityFieldAnnotation(
            text = "默认供应商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = "默认供应商ID"
    )
    private String supplierId;

    @EntityFieldAnnotation(
            text = "默认供应商名字",
            length = "100",
            default_value = "",
            comment = "默认供应商名字"
    )
    private String supplierName;
    @EntityFieldAnnotation(
            text = "厂商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = "厂商ID"
    )
    private String mgId;

    @EntityFieldAnnotation(
            text = "厂商名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "厂商名称"
    )
    private String mgName;
 /*   @EntityFieldAnnotation(
            text = "配送状态，0：未受理；-1：配送完成；1：开始配送",
            length = "",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Integer statusDist;*/

    @EntityFieldAnnotation(
            text = "关联配送单/调拨单ID",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String refId;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "包id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "-1",
            comment = ""
    )
    private String packTempletId;

    @EntityFieldAnnotation(
            text = "申请类型",
            length = "4",
            not_null = false,
            default_value = "",
            comment = "1请领,2 需求"
    )
    private String applyType;

    @EntityFieldAnnotation(
            text = "申请类型名称",
            length = "4",
            not_null = false,
            default_value = "",
            comment = "请领,需求"
    )
    private String applyTypeName;

    @EntityFieldAnnotation(
            text = "响应状态",
            length = "20",
            not_null = false,
            default_value = "no",
            comment = "响应状态"
    )
    private String responseStatus;

    @EntityFieldAnnotation(
            text = "响应状态描述",
            length = "500",
            not_null = false,
            type = EntityFieldType.TEXT,
            comment = "请领配送： 使用配送单状态，请领调拨：使用调拨单状态，请领需求：使用采购、入库单、调拨或者配送状态 需求作废状态"
    )
    private String responseStatusText;

    @EntityFieldAnnotation(
            text = "响应数量",
            not_null = false,
            default_value = "0",
            comment = "配送拣货数量，调拨数量"
    )
    private Double responseSkuQty;

    @EntityFieldAnnotation(
            text = "需求级别",
            not_null = false,
            default_value = "0",
            comment = "0常规，1紧急，特别紧急"
    )
    private String demandLevel;

    @EntityFieldAnnotation(
            text = "是否作废",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean isClose; ;

    /**
     *可用库存数量
     */
    @TableField(exist = false)
    private String canUseCountMsg;


    //模板需要添加的耗材id ,分割
    @TableField(exist = false)
    private String packTempletMatrIds;

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;

    @EntityFieldAnnotation(
            text = "耗材类型",
            length = "10",
            not_null = false,
            default_value = "matr",
            comment = "matr:耗材，reagent：试剂，drugs：药品"
    )
    private String baseType;

}
